/*
package com.imooc.controller;

import com.imooc.pojo.IMoocJSONResult;
import com.imooc.pojo.Resource;
import com.imooc.pojo.User;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;

*/
/**
 * Created by Administrator on 2018\5\8 0008.
 *//*

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private Resource resource;

    @RequestMapping("/getUser")
    public User getUser() {
        User u = new User();
        u.setName("imooc");
        u.setBirthday(new Date());
        u.setAge(18);
        u.setPassword("imooc");

        return u;
    }

    @RequestMapping("/getJsonUser")
    public IMoocJSONResult getJsonUser() {
        User u = new User();
        u.setName("imooc");
        u.setBirthday(new Date());
        u.setAge(18);
        u.setPassword("imooc");

        return IMoocJSONResult.ok(u);
    }

    @RequestMapping("/getResource")
    public IMoocJSONResult getResource() {
        Resource bean = new Resource();
        BeanUtils.copyProperties(resource, bean);

        return IMoocJSONResult.ok(bean);
    }

}
*/
